package com.lt.flashcard.model.entity;

import java.util.Date;

/**
 * Store the detail about a item in the card
 * @author ocsen
 *
 */
public class CartItem {

	private Long productid;
	private String productname;
	private String productimage;
	private String productdescription;
	private int productprice = 0;
	private int productcoin = 0;
	private Date created = new Date();
	
	public CartItem(Long id, String name, int price, int coin) {
		this.productid = id;
		this.productname = name;
		this.productprice = price;
		this.productcoin = coin;
	}
	
	@Override
	public String toString() {
		return String.format("CartItem<pid: %s, pname: %s, price: %s, coin: %s>", productid, productname, productprice, productcoin);
	}
	
	public Long getProductid() {
		return productid;
	}
	
	public void setProductid(Long productid) {
		this.productid = productid;
	}
	
	public String getProductname() {
		return productname;
	}
	
	public void setProductname(String productname) {
		this.productname = productname;
	}
	
	public String getProductdescription() {
		return productdescription;
	}

	public void setProductdescription(String productdescription) {
		this.productdescription = productdescription;
	}
	
	public int getProductprice() {
		return productprice;
	}
	
	public void setProductprice(int productprice) {
		this.productprice = productprice;
	}
	
	public int getProductcoin() {
		return productcoin;
	}
	
	public void setProductcoin(int productcoin) {
		this.productcoin = productcoin;
	}
	
	public Date getCreated() {
		return created;
	}
	
	public void setCreated(Date created) {
		this.created = created;
	}

	public String getProductimage() {
		return productimage;
	}

	public void setProductimage(String productimage) {
		this.productimage = productimage;
	}
}
